package com.zidian.study.fragment;

import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;

import com.zidian.study.activity.AddTaskActivity;
import com.zidian.study.activity.InteractionAskListActivity;
import com.zidian.study.activity.InteractionQuestionListActivity;
import com.zidian.study.activity.QuestionActivity;
import com.zidian.study.globa.BaseFragment;

import com.zidian.student.trucks.R;

import butterknife.OnClick;

/**
 * Created by tangyangkai on treasure_chest16/5/10.
 */
public class InteractionFragment extends BaseFragment {
    @Override
    protected int getLayoutId() {
        return R.layout.tab_fragment_interation;
    }


    private LinearLayout Ask;
    //    private LinearLayout Material;
    private LinearLayout Questionnaire;


    public static InteractionFragment newInstance() {
        return new InteractionFragment();
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    protected void initView(View view, Bundle savedInstanceState) {
        Ask = (LinearLayout) view.findViewById(R.id.interaction_ask);
//        Material = (LinearLayout) view.findViewById(R.id.interaction_material);
        Questionnaire = (LinearLayout) view.findViewById(R.id.interaction_questionnaire);
        Ask.setOnClickListener(mListener);
//        Material.setOnClickListener(mListener);
        Questionnaire.setOnClickListener(mListener);
    }

    private View.OnClickListener mListener = new View.OnClickListener() {
        @Override
        public void onClick(View view) {

            switch (view.getId()) {
                case R.id.interaction_ask:
                    startActivity(QuestionActivity.class);
                    break;
//                case R.id.interaction_material:
//                    startActivity(InteractionMaterialActivity.class);
//                    break;
                case R.id.interaction_questionnaire:
                    startActivity(InteractionQuestionListActivity.class);
                    break;
            }

        }
    };


}
